#ifndef __FLATPAKCONFIG__H__
#define __FLATPAKCONFIG__H__

#include "FlatpakBase.h"

class Flatpak::Config : public Flatpak::Base {
    public:
        initCommand(Config, "config");

        Config(const Config &) = default;
        Config(Config &&) = default;
        Config &operator=(const Config &) = default;
        Config &operator=(Config &&) = default;


        // --user/--system
        UserSystem(Config);


        // --list/--get<k>/--set<k/v>/--unset<k>
        Config list() {
            args << "--list";
            return *this;
        }

        Config get(QString arg) {
            args << "--get" << arg;
            return *this;
        }

        Config set(QString arg1, QString arg2) {
            args << "--set" << arg1 << arg2;
            return *this;
        }

        Config unset(QString arg) {
            args << "--unset" << arg;
            return *this;
        }

        // --ostree-verbose
        OstreeVerbose(Config)

        QString run() {
            Base::run();
            return FlatpakCommand::RunCommand(command, args);
        }
};

#endif  //!__FLATPAKCONFIG__H__


/****************************************************************
Usage:
  flatpak config [OPTION…] [KEY [VALUE]] - Manage configuration

Help Options:
  -h, --help              Show help options

Application Options:
  --user                  Work on the user installation
  --system                Work on the system-wide installation (default)
  --installation=NAME     Work on a non-default system-wide installation
  --list                  List configuration keys and values
  --get                   Get configuration for KEY
  --set                   Set configuration for KEY to VALUE
  --unset                 Unset configuration for KEY
  -v, --verbose           Show debug information, -vv for more detail
  --ostree-verbose        Show OSTree debug information

****************************************************************/
